<template>
  <div class="home">
    <div class="top"></div>
    <div class="tableList">
      <el-table v-loading="loading"
                :data="tableData"
                border
                stripe
                style="width: 100%;height:100%"
                size="mini">
        <el-table-column prop="headimgurl"
                         label="头像地址"
                         width="180">
        </el-table-column>
        <el-table-column prop="name"
                         label="姓名"
                         width="180">
        </el-table-column>
        <el-table-column prop="city"
                         label="地址"
                         width="180">
        </el-table-column>
        <el-table-column prop="cTime"
                         label="时间"
                         width="180">
        </el-table-column>
        <el-table-column prop="class"
                         label="班级"
                         width="180">
        </el-table-column>
        <el-table-column prop="age"
                         label="年龄"
                         width="180"> </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
import { getStudentList } from "../../../../api/index";

export default {
  components: {},
  data () {
    return {
      tableData: "",
      loading: false,
    };
  },
  created () { },
  mounted () {
    getStudentList().then((res) => {
      this.loading = true;
      console.log(res.data.data);
      this.tableData = res.data.data;
    }).finally(()=>{
      this.loading=false
    });
  },
  watch: {},
  computed: {},
  methods: {},
};
</script>
<style lang="scss" scoped>
.home {
  position: relative;
  height: 100%;
  width: 100%;
}
.top{
  position: relative;
  height: 10%;
  width: 100%;
  // background-color: aqua;
}
.tableList {
  position: relative;
  height: 90%;
  width: 100%;
}
</style>